<html>
<head>
<title></title>
    <script src="web/wxmodules/wxsdk.js"></script>
    <script>
        wx.config({
            debug: false,
            appId: <?=$signPackage["appId"];?>,
            timestamp: <?= $signPackage["timestamp"];?>,
            nonceStr: <?=$signPackage["nonceStr"];?>,
            signature: <?=$signPackage["signature"];?>,
            jsApiList: <?=$signPackage["jsApiList"];?>,
        });
        wx.ready(function () {
            wx.onMenuShareTimeline({
                title: '0元购买小普马桶', // 分享标题
                link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx5dee5a1c01f37b68&redirect_uri=<?=Yii::$app->params['domurl']?>wx%2Ffrontend%2Fweb%2Findex.php%3Fr%3Dsite%252Fsite%252Fdetail%26qcode%3Dcbfe7330-e0a6-11e7-85e3-a3ad0180d146&response_type=code&scope=snsapi_userinfo&state=authorize#wechat_redirect', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: '', // 分享图标
                success: function (res) {
                    // 用户确认分享后执行的回调函数
                    alert(res)
                },
                cancel: function (res) {
                    // 用户取消分享后执行的回调函数
                    alert(res)
                }
            });
        });
    </script>
</head>
<body>

</body>
</html>